const names = ["abc", "cba", "nba"]

names.forEach((item, index, arr) => {
  console.log(item, index, arr)
})